#include "BulletCollision/NarrowPhaseCollision/btGjkEpa2.h"
#ifdef __cplusplus
extern "C" {
#endif
btGjkEpaSolver2::sResults* bullet_NewbtGjkEpaSolver2sResults(){
	btGjkEpaSolver2::sResults* wrap_out = new btGjkEpaSolver2::sResults();
	return wrap_out;
}

double bullet_btGjkEpaSolver2sResults_GetFieldOfDistance(btGjkEpaSolver2::sResults* c_this){
	return (double)(c_this->distance);
}

btVector3* bullet_btGjkEpaSolver2sResults_GetFieldOfNormal(btGjkEpaSolver2::sResults* c_this){
	return (btVector3*)(&c_this->normal);
}

btGjkEpaSolver2::sResults::eStatus bullet_btGjkEpaSolver2sResults_GetFieldOfStatus(btGjkEpaSolver2::sResults* c_this){
	return (btGjkEpaSolver2::sResults::eStatus)(c_this->status);
}

btVector3** bullet_btGjkEpaSolver2sResults_GetFieldOfWitnesses(btGjkEpaSolver2::sResults* c_this){
	return (btVector3**)(&c_this->witnesses);
}

btGjkEpaSolver2* bullet_NewbtGjkEpaSolver2(){
	btGjkEpaSolver2* wrap_out = new btGjkEpaSolver2();
	return wrap_out;
}

bool bullet_btGjkEpaSolver2_Distance(btGjkEpaSolver2* c_this,btConvexShape* shape0,btTransform* wtrs0,btConvexShape* shape1,btTransform* wtrs1,btVector3* guess,btGjkEpaSolver2::sResults* results){
	btConvexShape const * c_arg_shape0=(btConvexShape const *)(void*)(shape0);
	btTransform const& c_arg_wtrs0=(btTransform const&)(*wtrs0);
	btConvexShape const * c_arg_shape1=(btConvexShape const *)(void*)(shape1);
	btTransform const& c_arg_wtrs1=(btTransform const&)(*wtrs1);
	btVector3 const& c_arg_guess=(btVector3 const&)(*guess);
	btGjkEpaSolver2::sResults& c_arg_results=(btGjkEpaSolver2::sResults&)(*results);
	bool c_out = c_this->Distance(c_arg_shape0,c_arg_wtrs0,c_arg_shape1,c_arg_wtrs1,c_arg_guess,c_arg_results);
	bool wrap_out = (c_out);
	return wrap_out;
}

bool bullet_btGjkEpaSolver2_Penetration(btGjkEpaSolver2* c_this,btConvexShape* shape0,btTransform* wtrs0,btConvexShape* shape1,btTransform* wtrs1,btVector3* guess,btGjkEpaSolver2::sResults* results,bool usemargins){
	btConvexShape const * c_arg_shape0=(btConvexShape const *)(void*)(shape0);
	btTransform const& c_arg_wtrs0=(btTransform const&)(*wtrs0);
	btConvexShape const * c_arg_shape1=(btConvexShape const *)(void*)(shape1);
	btTransform const& c_arg_wtrs1=(btTransform const&)(*wtrs1);
	btVector3 const& c_arg_guess=(btVector3 const&)(*guess);
	btGjkEpaSolver2::sResults& c_arg_results=(btGjkEpaSolver2::sResults&)(*results);
	bool c_arg_usemargins=usemargins;
	bool c_out = c_this->Penetration(c_arg_shape0,c_arg_wtrs0,c_arg_shape1,c_arg_wtrs1,c_arg_guess,c_arg_results,c_arg_usemargins);
	bool wrap_out = (c_out);
	return wrap_out;
}

double bullet_btGjkEpaSolver2_SignedDistance(btGjkEpaSolver2* c_this,btVector3* position,double margin,btConvexShape* shape,btTransform* wtrs,btGjkEpaSolver2::sResults* results){
	btVector3 const& c_arg_position=(btVector3 const&)(*position);
	btScalar c_arg_margin=margin;
	btConvexShape const * c_arg_shape=(btConvexShape const *)(void*)(shape);
	btTransform const& c_arg_wtrs=(btTransform const&)(*wtrs);
	btGjkEpaSolver2::sResults& c_arg_results=(btGjkEpaSolver2::sResults&)(*results);
	btScalar c_out = c_this->SignedDistance(c_arg_position,c_arg_margin,c_arg_shape,c_arg_wtrs,c_arg_results);
	double wrap_out = (c_out);
	return wrap_out;
}

bool bullet_btGjkEpaSolver2_SignedDistance1(btGjkEpaSolver2* c_this,btConvexShape* shape0,btTransform* wtrs0,btConvexShape* shape1,btTransform* wtrs1,btVector3* guess,btGjkEpaSolver2::sResults* results){
	btConvexShape const * c_arg_shape0=(btConvexShape const *)(void*)(shape0);
	btTransform const& c_arg_wtrs0=(btTransform const&)(*wtrs0);
	btConvexShape const * c_arg_shape1=(btConvexShape const *)(void*)(shape1);
	btTransform const& c_arg_wtrs1=(btTransform const&)(*wtrs1);
	btVector3 const& c_arg_guess=(btVector3 const&)(*guess);
	btGjkEpaSolver2::sResults& c_arg_results=(btGjkEpaSolver2::sResults&)(*results);
	bool c_out = c_this->SignedDistance(c_arg_shape0,c_arg_wtrs0,c_arg_shape1,c_arg_wtrs1,c_arg_guess,c_arg_results);
	bool wrap_out = (c_out);
	return wrap_out;
}

int bullet_btGjkEpaSolver2_StackSizeRequirement(btGjkEpaSolver2* c_this){
	int c_out = c_this->StackSizeRequirement();
	int wrap_out = (c_out);
	return wrap_out;
}

#ifdef __cplusplus
}
#endif
